package com.bootdo.slideshow.domain;

import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import com.bootdo.common.annotation.NotColumn;
import com.bootdo.common.fansheutils.FansheUtils;
import com.bootdo.common.fansheutils.JibenLei;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.haojiangbo.annotation.HapiFeild;
import org.apache.poi.sl.usermodel.SlideShow;


/**
 * 
 * 
 * @author lujingqian
 * @email 2100272728@qq.com
 * @date 2019-11-12 10:13:13
 */
 @JsonInclude(JsonInclude.Include.NON_NULL)
public class CommonsSlideshow extends JibenLei  implements Comparable<CommonsSlideshow>{
	@NotColumn
	private static final long serialVersionUID = 1L;
	
	
	//id
	 @NotColumn 	@HapiFeild("id")
	private Integer id;
	
	//名称
		@HapiFeild("名称")
	private String name;
	
	//图片地址
		@HapiFeild("图片地址")
	private String imgUrl;
	
	//是否显示
		@HapiFeild("是否显示")
	private Integer isShow;
	
	//资源id
		@HapiFeild("资源id")
	private Long resourceId;
	
	//是否删除
		@HapiFeild("是否删除")
	private Integer isDel;
	
	//排序
		@HapiFeild("排序")
	private Integer ramk;
	//排序
		@HapiFeild("颜色")
	private String color;

	//创建时间
		@HapiFeild("创建时间")
	private Date createTime;
	//轮播类型
		@HapiFeild("轮播类型")
	private Integer type;

	//资源跳转地址
		@HapiFeild("资源跳转地址")
	private String resourceUrl;

    public CommonsSlideshow(){
    
    	this.createTime = new Date();
    	this.isDel=0;
    	this.ramk=0;
    	this.isShow=1;
    	this.resourceId=1L;
    	this.type=1;
    	this.resourceUrl="0";
    	this.color="#E6443F";
    	this.imgUrl="";
    }

	public String getColor() {
		return color;
	}

	public void setColor(String color) {
		this.color = color;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	/**
	 * 设置：id
	 */
	public void setId(Integer id) {
		this.id = id;
	}
	/**
	 * 获取：id
	 */
	public Integer getId() {
		return id;
	}
	/**
	 * 设置：名称
	 */
	public void setName(String name) {
		this.name = name;
	}
	/**
	 * 获取：名称
	 */
	public String getName() {
		return name;
	}
	/**
	 * 设置：图片地址
	 */
	public void setImgUrl(String imgUrl) {
		this.imgUrl = imgUrl;
	}
	/**
	 * 获取：图片地址
	 */
	public String getImgUrl() {
		return imgUrl;
	}
	/**
	 * 设置：是否显示
	 */
	public void setIsShow(Integer isShow) {
		this.isShow = isShow;
	}
	/**
	 * 获取：是否显示
	 */
	public Integer getIsShow() {
		return isShow;
	}
	/**
	 * 设置：资源id
	 */
	public void setResourceId(Long resourceId) {
		this.resourceId = resourceId;
	}
	/**
	 * 获取：资源id
	 */
	public Long getResourceId() {
		return resourceId;
	}
	/**
	 * 设置：是否删除
	 */
	public void setIsDel(Integer isDel) {
		this.isDel = isDel;
	}
	/**
	 * 获取：是否删除
	 */
	public Integer getIsDel() {
		return isDel;
	}
	/**
	 * 设置：排序
	 */
	public void setRamk(Integer ramk) {
		this.ramk = ramk;
	}
	/**
	 * 获取：排序
	 */
	public Integer getRamk() {
		return ramk;
	}
	/**
	 * 设置：创建时间
	 */
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	/**
	 * 获取：创建时间
	 */
	public Date getCreateTime() {
		return createTime;
	}
	/**
	 * 设置：资源跳转地址
	 */
	public void setResourceUrl(String resourceUrl) {
		this.resourceUrl = resourceUrl;
	}
	/**
	 * 获取：资源跳转地址
	 */
	public String getResourceUrl() {
		return resourceUrl;
	}


	@Override
	@JsonIgnore
	public List<HashMap<String, Object>> getFields() {
		// TODO Auto-generated method stub
		return FansheUtils.getFieldList(this);
	}

	@Override
	public int compareTo(CommonsSlideshow slideShow) {//重写Comparable接口的compareTo方法，
		return slideShow.getRamk() - this.ramk;// 根据排序升序排列，降序修改相减顺序即可
	}
}
